const express = require('express')
const app = express()
const cors = require('cors')
const router = require('./router/index')
const uuid = require('node-uuid')


app.use(express.urlencoded({ extended: false }))
app.use(express.json())
app.use(cors())
app.use(router)
app.use('/',express.static('./images'))



app.listen(3000, e => {
    if (e) {
        console.log(e)
    } else {
        console.log(uuid())
        console.log('Server running at http://localhost:3000')
    }
})